<template>
  <div class="view-detail">
    <el-dialog
      :title="title"
      :visible.sync="dialogVisible"
      :close-on-click-modal="false"
      width="1000px"
    >
      <div class="content-wrap">
        <div class="content-wrap-in" v-newhtml="checkedData.content"></div>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">关 闭</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import Bus from '@/utils/bus.js'
export default {
  name: 'ViewDetail',
  data() {
    return {
      title: '详情',
      dialogVisible: false,
      checkedData: {},
    }
  },
  mounted() {
    Bus.$on('showDialogViewDetail', (v, title) => {
      this.checkedData = v
      this.title = title ? title : '详情'
      this.dialogVisible = true
    })
  },
  beforeDestroy() {
    Bus.$off('showDialogViewDetail')
  },
  methods: {
    //重置表单
  },
}
</script>
<style scoped lang="scss">
.view-detail {
  .content-wrap {
    min-height: 400px;
    max-height: 550px;
    overflow-y: scroll;
    .content-wrap-in {
      color: #333;
      text-indent: 2em;
      font-size: 16px !important;
      line-height: 2;
      span {
        color: #333;
        text-indent: 2em;
        font-size: 16px;
        line-height: 2;
      }
      .img-style {
        max-width: 90%;
        margin: 0 auto;
        display: inherit;
        font-family: '微软雅黑';
      }
    }
  }
}
</style>